﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using iMapa.UI.View.Main.Wizard;
using iMapa.UI.ModelView.Main.Wizard;
using iMapa.UI.ModelView.Main;

namespace iMapa.UI.View.Main
{
    /// <summary>
    /// Interaction logic for MainToolbar.xaml
    /// </summary>
    public partial class MainToolbar : UserControl
    {

        public MainToolbar()
        {
            InitializeComponent();
           
        }

        private void newGroup_Click(object sender, RoutedEventArgs e)
        {
            SimulationGroupsViewModel modelview = (SimulationGroupsViewModel)this.DataContext;
            modelview.AddNewGroup();
        }

        private void newIMap_Click(object sender, RoutedEventArgs e)
        {
            SimulationGroupsViewModel modelview = (SimulationGroupsViewModel)this.DataContext;
            Window w = new NewIMapWizardWindow();
            NewIMapWizardViewModel vm = new NewIMapWizardViewModel(modelview);
            w.DataContext = vm;
            w.Owner = Window.GetWindow(this);
            w.ShowDialog();
        }
    }
}
